package com.yanqu.road.server.cmd.activity;

import com.yanqu.road.pb.rank.CrossUnionActivityRankProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_CROSS_UNION_ACTIVITY_MEMBER_CONDITION_DATA_RESP, desc = "跨服查询查询跨服商会争霸成员贡献响应")
public class CrossUnionActivityMemberConditionDataRespCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        CrossUnionActivityRankProto.CrossServerUnionActivityConditionUnionMemberDataRespMsg reqMsg = CrossUnionActivityRankProto.CrossServerUnionActivityConditionUnionMemberDataRespMsg.parseFrom(packet.getBytes());
        CrossUnionActivityRankProto.CrossUnionActivityConditionUnionMemberDataRespMsg.Builder msg = CrossUnionActivityRankProto.CrossUnionActivityConditionUnionMemberDataRespMsg.newBuilder();
        msg.setRet(reqMsg.getRet());
        if(0 == reqMsg.getRet()){
            msg.setDataList(reqMsg.getDataList());
            msg.setParam(reqMsg.getParam());
        }
        YanQuMessage pbMsg = YanQuMessageUtils.buildMessage(Protocol.S_CROSS_ACTIVITY_UNION_CROSS_MEMBER_CONDITION_NOTIFY, msg);
        MessageHelper.sendPacket(reqMsg.getServerId(), reqMsg.getUserId(), pbMsg);
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
